﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace HFK.DxFluentUI.Utility
{
  public class DevExpressPropertyDescriptorSyntax
  {
    public static string ObjectReference() 
    {
      return null;
      //return "This"; 
    }

    public static string PropertyReference<T, U>(Expression<Func<T, U>> expression)
    {
      string propertyName = ChildPropertySyntax.Create<T, U>(expression).PropertyName;
      //Type propertyType = ExpressionHelper.ExpressionType<T, U>(expression);
      //if (!propertyType.IsPrimitive && propertyType != typeof(string))
      //{
      //  propertyName = propertyName + "!";
      //}

      return propertyName; 
    }
  }
}
